package com.bcx.controller;

import com.bcx.pojo.Category;
import com.bcx.service.CategoryService;
import com.bcx.tool.ResultEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.xml.transform.Result;
import java.util.List;

@RestController
public class CategoryController {
    @Resource
    CategoryService categoryService;
    @RequestMapping("/getCategoryList")
    public ResultEntity<List<Category>> getCategoryList(){
        List<Category> categoryList=categoryService.selectAll();
        return ResultEntity.successWithoutData(categoryList);
    }
}
